<template>
  <view class="commit_btn" :style="safeBottomStyle">
    <view class="bottom_btn" @click="CommitEvent">
      <text>{{ btnText }}</text>
    </view>
    <view class="bottom_label" @click="jumpToPage('/pages/global/protocol1')">
      <text>发布需求信息即表示接受</text>
      <text class="fz">《E商机需求信息发布规则》</text>
      <text>，如果违反 规则，可能导致您的账号异常</text>
    </view>
  </view>
</template>

<script>
export default {
  name: 'comit-btn',
  props: {
    btnText: {
      type: String,
      default() {
        return '';
      }
    }
  },
  data() {
    return {
      globalData: getApp().globalData,
      safeBottomStyle: ''
    };
  },
  onLoad() {
    this.safeBottomStyle = `padding-bottom:${this.globalData.customizeInfo.safeAreaBottom}rem`;
  },
  methods: {
    CommitEvent() {
      this.$emit('CommitEvent', null);
    },
    jumpToPage(url) {
      uni.navigateTo({ url });
    }
  }
};
</script>

<style lang="scss" scoped>
.commit_btn {
  z-index: 999;
  width: 100%;
  // height: 130rem;
  padding: 12rem;
  box-sizing: border-box;
  position: fixed;
  bottom: 0;
  left: 0;
  background: rgba(255, 251, 247, 1);
}

.bottom_btn {
  width: 100%;
  padding: 12rem;
  height: 44rem;
  box-sizing: border-box;
  background: #ff7c00;
  color: #ffffff;
  font-size: 16rem;
  font-weight: 700;
  text-align: center;
  border-radius: 50rem;
}

.bottom_label {
  text-align: center;
  width: 100%;

  text {
    font-size: 12rem;
    font-weight: 400;
    letter-spacing: 0rem;
    line-height: 17.38rem;
    color: rgba(128, 128, 128, 1);
  }

  .fz {
    font-size: 12rem;
    font-weight: 400;
    letter-spacing: 0rem;
    line-height: 17.38rem;
    color: rgba(255, 124, 0, 1);
  }
}
</style>
